package net.huashitong.user.service;

import java.util.List;

import net.huashitong.user.dao.PostilDao;
import net.huashitong.user.entity.Postil;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;

@Service
public class PostilService extends StringPKService<Postil> {

	@Autowired
	private SysTableService tableService;
	@Autowired
	private PostilDao dao;
	@Override
	protected BaseDao<Postil, String> getDao() {
		// TODO Auto-generated method stub
		return dao;
	}
	@Override
	protected void beforeSave(Postil postil) {
		postil.setSysId(tableService.updateMaxSysId("t_gis_postil", null));
	}
	public List<String> queryByUserId(String userId) {
		return dao.queryByUserId(userId);
	}
	public List<Postil> queryByDate(String date,String userId) {
		return dao.queryByDate(date,userId);
	}
}
